package com.chenbei.erp.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chenbei.common.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

@TableName("erp_product_category")
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "产品分类")
public class ProductCategory extends BaseEntity {

    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "父ID")
    @TableField("pid")
    private Long pid;

    @Schema(description = "名称")
    @TableField("name")
    @NotBlank(message = "分类名称不能为空")
    private String name;

    @Schema(description = "状态[1:启用|2:禁用]")
    @TableField("status")
    private Integer status;

    @Schema(description = "备注")
    @TableField("remarks")
    private String remarks;
}
